package com.gr.controller;

import com.gr.entity.User;
import com.gr.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/login")
    public String Login(User user){
        User user1=userService.login(user);
        if (user1!=null){
            return "/phone/selectAllPhoneAndBrand.do";
        }else {
            return "/index.jsp";
        }
    }
}
